﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="uc_Cate_Route_Detail.ascx.cs"
    Inherits="Category_UserControl_uc_Cate_Route_Detail" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<div style="height: 850px">
    <div class="TitlePage">
        PHÂN TUYẾN</div>
    <telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
        <script type="text/javascript" id="Script1">
            function KeyPress(e) {
                if (e.which == 13) {
                    $("#<%= btnSearch.ClientID %>").click();
                    return false;
                }
            };
            function DropDownClosing(sender, args) {
                __doPostBack(sender.get_id(), "DropDownClosing");
            };
        </script>
    </telerik:RadCodeBlock>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:Panel runat="server" ID="pnlSearch">
                <div style="text-align: left; width: 100%">
                    <fieldset>
                        <table width="100%">
                            <tr>
                                <td class="tdsearch1">
                                </td>
                                <td align="left" class="tdsearch2">
                                    Tên tuyến <span style="color: Red">(*)</span>:
                                </td>
                                <td align="left" class="tdsearch3">
                                    <asp:DropDownList ID="ddlRoute" CssClass="txtBox" runat="server" Width="102.5%" AutoPostBack="false">
                                    </asp:DropDownList>
                                </td>
                                <td class="tdsearch4">
                                </td>
                                <td class="tdsearch7">
                                </td>
                            </tr>
                            <tr>
                                <td align="left" class="divClearBothInAdmin">
                                </td>
                            </tr>
                            <tr>
                                <td class="tdsearch1">
                                </td>
                                <td align="left" class="tdsearch2">
                                    Chọn kho <span style="color: Red">(*)</span>:
                                </td>
                                <td align="left" class="tdsearch3">
                                    <asp:DropDownList ID="ddlKho" CssClass="txtBox" runat="server" Width="102.5%" AutoPostBack="false">
                                    </asp:DropDownList>
                                </td>
                                <td class="tdsearch4">
                                </td>
                                <td align="left" class="tdsearch5">
                                    Chọn vùng <span style="color: Red">(*)</span>:
                                </td>
                                <td align="left" class="tdsearch6">
                                    <asp:DropDownList ID="ddlVung" CssClass="txtBox" runat="server" Width="102.5%" AutoPostBack="True"
                                        OnSelectedIndexChanged="ddlVung_SelectedIndexChanged">
                                    </asp:DropDownList>
                                </td>
                                <td class="tdsearch7">
                                </td>
                            </tr>
                            <tr>
                                <td align="left" class="divClearBothInAdmin">
                                </td>
                            </tr>
                            <tr>
                                <td class="tdsearch1">
                                </td>
                                <td align="left" class="tdsearch2">
                                    Chọn Tỉnh/Thành <span style="color: Red">(*)</span>:
                                </td>
                                <td align="left" class="tdsearch3">
                                    <telerik:RadComboBox ID="ddlTinhThanh" runat="server" Height="140px" Width="102.5%"
                                        RenderingMode="Full" CheckBoxes="true" EnableCheckAllItemsCheckBox="true" OnClientDropDownClosing="DropDownClosing">
                                        <Localization AllItemsCheckedString="Đã chọn tất cả" CheckAllString="Chọn tất cả"
                                            ItemsCheckedString=" dòng được chọn" />
                                    </telerik:RadComboBox>
                                </td>
                                <td class="tdsearch4">
                                </td>
                                <td align="left" class="tdsearch5">
                                    Chọn Quận/Huyện <span style="color: Red">(*)</span>:
                                </td>
                                <td align="left" class="tdsearch6">
                                    <telerik:RadComboBox ID="ddlQuanHuyen" runat="server" Height="140px" Width="102.5%"
                                        RenderingMode="Full" CheckBoxes="true" EnableCheckAllItemsCheckBox="true">
                                        <Localization AllItemsCheckedString="Đã chọn tất cả" CheckAllString="Chọn tất cả"
                                            ItemsCheckedString=" dòng được chọn" />
                                    </telerik:RadComboBox>
                                </td>
                                <td class="tdsearch7">
                                </td>
                            </tr>
                            <tr>
                                <td align="left" class="divClearBothInAdmin">
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="7">
                                    <asp:Label ID="lblAlerting" runat="server" CssClass="Alerting"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="7">
                                    <asp:Button CssClass="btn_admin" ID="btnSearch" runat="server" Text="Tìm kiếm" OnClick="btnSearch_Click" />
                                    &nbsp;&nbsp;
                                    <asp:Button CssClass="btn_admin" ID="btnXoaTrang" runat="server" Text="Xóa trắng"
                                        OnClick="btnXoaTrang_Click" />
                                    &nbsp;&nbsp;
                                    <asp:Button CssClass="btn_admin" ID="btnSave" runat="server" Text="Thêm mới" OnClick="btnSave_Click" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </div>
            </asp:Panel>
            <div style="clear: both; height: 10px">
            </div>
            <div id="divRouteList">
                <asp:GridView ID="grdRouteList" runat="server" AutoGenerateColumns="false" DataKeyNames="ID"
                    Width="100%" CssClass="grid" AllowPaging="True" PageSize="20" OnRowEditing="grdRouteList_RowEditing"
                    OnPageIndexChanging="grdRouteList_PageIndexChanging">
                    <Columns>
                        <asp:TemplateField HeaderText="Tên tuyến">
                            <ItemTemplate>
                                <asp:Label ID="lblListingRouteName" runat="server" Text='<%# Eval("RouteName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tên Kho">
                            <ItemTemplate>
                                <asp:Label ID="lblListingTenKho" runat="server" Text='<%# Eval("TenKho") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tên vùng">
                            <ItemTemplate>
                                <asp:Label ID="lblListingTenVung" runat="server" Text='<%# Eval("TenVung") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tên Tỉnh/Thành">
                            <ItemTemplate>
                                <asp:Label ID="lblListingTenTinhThanh" runat="server" Text='<%# Eval("TenTinhThanh") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tên Quận/Huyện">
                            <ItemTemplate>
                                <asp:Label ID="lblListingTenQuanHuyen" runat="server" Text='<%# Eval("TenQuanHuyen") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="LeadTime" ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:Label ID="lblListingLeadTime" runat="server" Text='<%# string.Format("{0:N0}", Eval("LeadTime")) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="RouteID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblListingRouteID" runat="server" Text='<%# Eval("RouteID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="KhoID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblListingKhoID" runat="server" Text='<%# Eval("KhoID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="VungID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblListingVungID" runat="server" Text='<%# Eval("VungID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="TinhThanhID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblListingTinhThanhID" runat="server" Text='<%# Eval("TinhThanhID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="QuanHuyenID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lblListingQuanHuyenID" runat="server" Text='<%# Eval("QuanHuyenID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-HorizontalAlign="Center">
                            <ItemTemplate>
                                <asp:LinkButton ID="btnListingEdit" runat="server" Text="Sửa" CommandName="Edit"
                                    CommandArgument='<%# Eval("RouteID") %>' Font-Underline="false" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <PagerStyle CssClass="pager" HorizontalAlign="Right" />
                </asp:GridView>
            </div>
            <asp:HiddenField ID="hdfID" runat="server" />
            <asp:HiddenField ID="hdfQUANHUYENID" runat="server" />
            <asp:HiddenField ID="hdfTINHTHANHID" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
</div>
